Merge "Allow hook subscribers to also overwrite link to title"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 2 Sep 2014 20:54:51 +0000 (20:54 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 2 Sep 2014 20:54:51 +0000 (20:54 +0000)
1  2 
RELEASE-NOTES-1.24
docs/hooks.txt

diff --combined RELEASE-NOTES-1.24
@@@ -42,8 -42,8 +42,8 @@@ production
    configurations are $wgDeletedDirectory and $wgHashedUploadDirectory.
  * The deprecated $wgUseCommaCount variable has been removed.
  * $wgEnableSorbs and $wgSorbsUrl have been removed.
 -* The UserCryptPassword and UserComparePassword hooks are no longer called. Any extensions
 -  using them must be updated to use the Password Hashing API.
 +* The UserCryptPassword and UserComparePassword hooks are no longer called.
 +  Any extensions using them must be updated to use the Password Hashing API.
  * $wgCompiledFiles has been removed.
  * $wgSortSpecialPages was removed, the listing on Special:SpecialPages is
    now always sorted.
    may need to adjust your default user settings to compensate for the index change.
  * $wgDeferredUpdateList is now deprecated, you should use DeferredUpdates::addUpdate()
    instead.
 +* $wgCanonicalLanguageLinks has been removed. Per Google recommendations, we
 +  will not send a rel=canonical pointing to a variant-neutral page, however
 +  we will send rel=alternate.
  
  === New features in 1.24 ===
+ * Added new argument &$link in hook WatchlistEditorBuildRemoveLine, allowing the
+   link to the title to be changed.
  * Added a new hook, "WhatLinksHereProps", to allow extensions to annotate
    WhatLinksHere entries.
  * Added a new hook, "ContentGetParserOutput", to customize parser output for
  * (bug 35045) Redirects to sections will now update the URL in browser's address
    bar using the HTML5 History API. When [[Dog]] redirects to [[Animals#Dog]],
    the user will now see "Animals#Dog" in their browser instead of "Dog#Dog".
 +* API token handling has been rewritten. Any API module using tokens will need
 +  to be updated. See the entry below under "Action API internal changes".
 +* Added HTMLAutoCompleteSelectField.
  
  === Bug fixes in 1.24 ===
  * (bug 50572) MediaWiki:Blockip should support gender
  * (bugs 57238, 65206) Blank pages can now be directly created.
  * (bug 69789) Title::getContentModel() now loads from the database when
    necessary instead of incorrectly returning the default content model.
 +* (bug 69249) wfBaseConvert() now works around PHP Bug #50175 when using GMP.
  
 -=== Web API changes in 1.24 ===
 +=== Action API changes in 1.24 ===
  * action=parse API now supports prop=modules, which provides the list of
    ResourceLoader modules that should be used to enhance the parsed content.
  * action=query&meta=siteinfo&siprop=interwikimap returns a new "protorel"
 -  field which is true iff protocol-relative urls can be used to access
 +  field which is true if protocol-relative urls can be used to access
    a particular interwiki map entry.
 -* ApiQueryLogEvents now provides logpage, which is the page ID from the
 +* list=logevents now provides logpage, which is the page ID from the
    logging table, if ids are requested and the user has the permissions.
  * action=edit now requires that appendtext, prependtext, or section=new be used
    when using the 'redirect' parameter, to prevent clients accidentally
    overwriting the target page with the content of the redirect.
 -* action=logevents will now return an error if both letitle and leprefix are
 +* list=logevents will now return an error if both letitle and leprefix are
    specified.
 -* action=logevents has a new parameter, lenamespace, to allow filtering by
 +* list=logevents has a new parameter, lenamespace, to allow filtering by
    namespace.
  * action=expandtemplates has a new parameter, prop, and a new output format.
    The old format is still used if prop isn't provided, but this is deprecated.
  * (bug 60734) Actions that use ApiPageSet (e.g. purge, watch,
    setnotificationtimestamp) will now include continuation information when
    using a generator.
 +* Removed 'props' and 'errors' from action=paraminfo, as they have extremely
 +  limited use and are generally inaccurate, unmaintained, and impossible to
 +  properly maintain.
 +* Formats dbg, dump, txt, wddx, and yaml are now deprecated.
 +* action=paraminfo now indicates when a parameter is specifying a submodule.
 +* The iwurl parameter to prop=iwlinks is deprecated in favor of iwprop=url, for
 +  parallelism with prop=langlinks.
 +* All tokens should be fetched from action=query&meta=tokens; all other methods
 +  of fetching tokens are deprecated. The value needed for meta=tokens's 'type'
 +  parameter for each module is documented in the action=help output and is
 +  returned from action=paraminfo.
 +
 +=== Action API internal changes in 1.24 ===
 +* Methods for handling continuation are added to ApiResult, so actions other
 +  than query that use generators can easily support continuation.
  * $wgAPIModules (and the related $wgAPIFormatModules, $wgAPIMetaModules,
    $wgAPIPropModules, and $wgAPIListModules settings) now allow API modules
    to be specified using a "module spec" array instead of a plain class name.
    to use for the module. This is intended for extensions that want control over
    the instantiation of their API modules, to allow for proper dependency
    injection.
 -* Removed 'props' and 'errors' from action=paraminfo, as they have extremely
 -  limited use and are generally inaccurate, unmaintained, and impossible to
 -  properly maintain. Also removed the corresponding methods from ApiBase and
 -  the 'APIGetPossibleErrors' and 'APIGetResultProperties' hooks.
 -* Formats dbg, dump, txt, wddx, and yaml are now deprecated.
 -* action=paraminfo now indicates when a parameter is specifying a submodule.
 -  Internally, a new param type 'submodule' is available to indicate this which
 -  automatically queries the list of submodule names from the ApiModuleManager.
 -* The iwurl parameter to prop=iwlinks is deprecated in favor of iwprop=url, for
 -  parallelism with prop=langlinks.
 +* A new param type 'submodule' is available. Parameters of this type will take
 +  the list of valid values from the module's ApiModuleManager for the group
 +  corresponding to the parameter name.
 +* The 'APIGetPossibleErrors' and 'APIGetResultProperties' hooks are no longer used.
 +* API token handling has been rewritten. Any API module using tokens will need
 +  to be updated:
 +  * ApiBase::needsToken now returns a token type instead of boolean true when a
 +    token is needed. Returning true will throw an exception. See documentation
 +    of that method for details.
 +  * Information for the 'token' parameter is automatically set by ApiBase
 +    getFinalParams and getFinalParamDescription.
 +  * ApiBase::getTokenSalt has been removed.
 +  * The hooks APIQueryInfoTokens, APIQueryRevisionsTokens,
 +    APIQueryRecentChangesTokens, APIQueryUsersTokens, and
 +    ApiTokensGetTokenTypes are deprecated, but are still called to support
 +    backwards-compatible token access.
 +* ApiBase::validateLimit and ApiBase::validateTimestamp are now protected.
 +* The following methods have been deprecated and may be removed in a future
 +  release:
 +  * ApiBase::getResultProperties
 +  * ApiBase::getFinalResultProperties
 +  * ApiBase::addTokenProperties
 +  * ApiBase::getRequireOnlyOneParameterErrorMessages
 +  * ApiBase::getRequireMaxOneParameterErrorMessages
 +  * ApiBase::getRequireAtLeastOneParameterErrorMessages
 +  * ApiBase::getTitleOrPageIdErrorMessage
 +  * ApiBase::getPossibleErrors
 +  * ApiBase::getFinalPossibleErrors
 +  * ApiBase::parseErrors
 +  * ApiQuery::setGeneratorContinue
 +  * ApiQueryBase::checkRowCount
 +  * ApiQueryBase::titleToKey
 +  * ApiQueryBase::keyToTitle
 +  * ApiQueryBase::keyPartToTitle
 +  * ApiQueryInfo::getTokenFunctions
 +  * ApiQueryInfo::resetTokenCache
 +  * ApiQueryInfo::getEditToken
 +  * ApiQueryInfo::getDeleteToken
 +  * ApiQueryInfo::getProtectToken
 +  * ApiQueryInfo::getMoveToken
 +  * ApiQueryInfo::getBlockToken
 +  * ApiQueryInfo::getUnblockToken
 +  * ApiQueryInfo::getEmailToken
 +  * ApiQueryInfo::getImportToken
 +  * ApiQueryInfo::getWatchToken
 +  * ApiQueryInfo::getOptionsToken
 +  * ApiQueryRecentChanges::getTokenFunctions
 +  * ApiQueryRecentChanges::getPatrolToken
 +  * ApiQueryRevisions::getTokenFunctions
 +  * ApiQueryRevisions::getRollbackToken
 +  * ApiQueryUsers::getTokenFunctions
 +  * ApiQueryUsers::getUserrightsToken
 +* The following classes have been deprecated and may be removed in a future
 +  release:
 +  * ApiFormatDbg
 +  * ApiFormatDump
 +  * ApiFormatTxt
 +  * ApiFormatWddx
 +  * ApiFormatYaml
 +  * ApiTokens
  
  === Languages updated in 1.24 ===
  
@@@ -378,7 -308,7 +380,7 @@@ changes to languages because of Bugzill
    set of hooks has been removed and replaced by a single new hook
    SpecialPageBeforeFormDisplay.
  * (bug 65781) Removed block warning on included {{Special:Contributions}}
 -* Removed Skin::makeGlobalVariablesScript. (deprecated since 1.19)
 +* Removed Skin::makeGlobalVariablesScript(). (deprecated since 1.19)
  * Removed MWNamespace::isMain(). (deprecated since 1.19)
  * Removed Preferences::loadOldSearchNs(). (deprecated since 1.19)
  * Removed OutputPage::getStatusMessage(). (deprecated since 1.18)
    setPreloadedText() from EditPage.php. (deprecated since 1.21)
  * Removed global functions wfArrayLookup(), wfArrayMerge(), wfDebugDieBacktrace()
    and wfTime(). (deprecated since 1.22)
 -* Microsoft Internet Explorer 6 is now a "grade C" browser, meaning that
 -  JavaScript is no longer executed in this browser. The IEFixes script, which
 -  existed purely to provide support for MSIE versions below 7 and which was
 -  conditionally loaded for those browsers, was also removed.
 +* Browser support for Internet Explorer 6 lowered from Grade A to Grade C,
 +  meaning that JavaScript is no longer executed in this browser.
 +* Browser support for Opera 11 lowered from Grade A to Grade C.
 +* Removed IEFixes module which existed purely to provide support for MSIE versions
 +  below 7 (conditionally loaded only for those browsers).
  * Action::checkCanExecute() no longer has a return value.
  * Removed cleanupForIRC(), loadFromCurRow(), newFromCurRow(), notifyRC2UDP()
    and sendToUDP() from RecentChange.php. (deprecated since 1.22)
  * Removed EnhancedChangesList::arrow(), sideArrow(), downArrow(), spacerArrow().
  * Removed Xml::namespaceSelector(). (deprecated since 1.19)
 -* Removed WikiPage::estimateRevisionCount. (deprecated since 1.19)
 +* Removed WikiPage::estimateRevisionCount(). (deprecated since 1.19)
 +* MYSQL: Enum item added to "major MIME type" columns.
 +  Running update.php on MySQL < v5.1 may result in heavy processing.
 +* RSS and Atom feeds generated by MediaWiki no longer include a fallback
 +  stylesheet. It was ignored by most browsers these days anyway.
 +* SpecialSearchNoResults hook has been removed. SpecialSearchResults is now
 +  called unconditionally.
 +* TablePager::getBody() is now 'final' and can't be overridden in subclasses.
 +* TablePager::getBody() is deprecated, use getBodyOutput() or getFullOutput().
  
  ==== Renamed classes ====
  * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression
diff --combined docs/hooks.txt
@@@ -402,39 -402,36 +402,39 @@@ an action=query submodule. Use this to 
  &$module: Module object
  &$resultPageSet: ApiPageSet object
  
 -'APIQueryInfoTokens': Use this hook to add custom tokens to prop=info. Every
 -token has an action, which will be used in the intoken parameter and in the
 -output (actiontoken="..."), and a callback function which should return the
 -token, or false if the user isn't allowed to obtain it. The prototype of the
 -callback function is func($pageid, $title), where $pageid is the page ID of the
 -page the token is requested for and $title is the associated Title object. In
 -the hook, just add your callback to the $tokenFunctions array and return true
 -(returning false makes no sense).
 +'APIQueryInfoTokens': DEPRECATED! Use ApiQueryTokensRegisterTypes instead.
 +Use this hook to add custom tokens to prop=info. Every token has an action,
 +which will be used in the intoken parameter and in the output
 +(actiontoken="..."), and a callback function which should return the token, or
 +false if the user isn't allowed to obtain it. The prototype of the callback
 +function is func($pageid, $title), where $pageid is the page ID of the page the
 +token is requested for and $title is the associated Title object. In the hook,
 +just add your callback to the $tokenFunctions array and return true (returning
 +false makes no sense).
  $tokenFunctions: array(action => callback)
  
 -'APIQueryRevisionsTokens': Use this hook to add custom tokens to prop=revisions.
 -Every token has an action, which will be used in the rvtoken parameter and in
 -the output (actiontoken="..."), and a callback function which should return the
 -token, or false if the user isn't allowed to obtain it. The prototype of the
 -callback function is func($pageid, $title, $rev), where $pageid is the page ID
 -of the page associated to the revision the token is requested for, $title the
 +'APIQueryRevisionsTokens': DEPRECATED! Use ApiQueryTokensRegisterTypes instead.
 +Use this hook to add custom tokens to prop=revisions. Every token has an
 +action, which will be used in the rvtoken parameter and in the output
 +(actiontoken="..."), and a callback function which should return the token, or
 +false if the user isn't allowed to obtain it. The prototype of the callback
 +function is func($pageid, $title, $rev), where $pageid is the page ID of the
 +page associated to the revision the token is requested for, $title the
  associated Title object and $rev the associated Revision object. In the hook,
  just add your callback to the $tokenFunctions array and return true (returning
  false makes no sense).
  $tokenFunctions: array(action => callback)
  
 -'APIQueryRecentChangesTokens': Use this hook to add custom tokens to
 -list=recentchanges. Every token has an action, which will be used in the rctoken
 -parameter and in the output (actiontoken="..."), and a callback function which
 -should return the token, or false if the user isn't allowed to obtain it. The
 -prototype of the callback function is func($pageid, $title, $rc), where $pageid
 -is the page ID of the page associated to the revision the token is requested
 -for, $title the associated Title object and $rc the associated RecentChange
 -object. In the hook, just add your callback to the $tokenFunctions array and
 -return true (returning false makes no sense).
 +'APIQueryRecentChangesTokens': DEPRECATED! Use ApiQueryTokensRegisterTypes instead.
 +Use this hook to add custom tokens to list=recentchanges. Every token has an
 +action, which will be used in the rctoken parameter and in the output
 +(actiontoken="..."), and a callback function which should return the token, or
 +false if the user isn't allowed to obtain it. The prototype of the callback
 +function is func($pageid, $title, $rc), where $pageid is the page ID of the
 +page associated to the revision the token is requested for, $title the
 +associated Title object and $rc the associated RecentChange object. In the
 +hook, just add your callback to the $tokenFunctions array and return true
 +(returning false makes no sense).
  $tokenFunctions: array(action => callback)
  
  'APIQuerySiteInfoGeneralInfo': Use this hook to add extra information to the
@@@ -446,19 -443,13 +446,19 @@@ $module: the current ApiQuerySiteInfo m
  sites statistics information.
  &$results: array of results, add things here
  
 -'APIQueryUsersTokens': Use this hook to add custom token to list=users. Every
 -token has an action, which will be used in the ustoken parameter and in the
 -output (actiontoken="..."), and a callback function which should return the
 -token, or false if the user isn't allowed to obtain it. The prototype of the
 -callback function is func($user) where $user is the User object. In the hook,
 -just add your callback to the $tokenFunctions array and return true (returning
 -false makes no sense).
 +'ApiQueryTokensRegisterTypes': Use this hook to add additional token types to
 +action=query&meta=tokens. Note that most modules will probably be able to use
 +the 'csrf' token instead of creating their own token types.
 +&$salts: array( type => salt to pass to User::getEditToken() )
 +
 +'APIQueryUsersTokens': DEPRECATED! Use ApiQueryTokensRegisterTypes instead.
 +Use this hook to add custom token to list=users. Every token has an action,
 +which will be used in the ustoken parameter and in the output
 +(actiontoken="..."), and a callback function which should return the token, or
 +false if the user isn't allowed to obtain it. The prototype of the callback
 +function is func($user) where $user is the User object. In the hook, just add
 +your callback to the $tokenFunctions array and return true (returning false
 +makes no sense).
  $tokenFunctions: array(action => callback)
  
  'ApiMain::onException': Called by ApiMain::executeActionWithErrorHandling() when
@@@ -472,8 -463,8 +472,8 @@@ key for the array that represents the s
  key-value-pair identified by the apiLink key is required.
  &$apis: array of services
  
 -'ApiTokensGetTokenTypes': Use this hook to extend action=tokens with new token
 -types.
 +'ApiTokensGetTokenTypes': DEPRECATED! Use ApiQueryTokensRegisterTypes instead.
 +Use this hook to extend action=tokens with new token types.
  &$tokenTypes: supported token types in format 'type' => callback function
  used to retrieve this type of tokens.
  
@@@ -2513,11 -2504,16 +2513,11 @@@ $specialSearch: SpecialSearch object ($
  $output: $wgOut
  $term: Search term specified by the user
  
 -'SpecialSearchResults': Called before search result display when there are
 -matches.
 +'SpecialSearchResults': Called before search result display
  $term: string of search term
  &$titleMatches: empty or SearchResultSet object
  &$textMatches: empty or SearchResultSet object
  
 -'SpecialSearchNoResults': Called before search result display when there are no
 -matches.
 -$term: string of search term
 -
  'SpecialStatsAddExtra': Add extra statistic at the end of Special:Statistics.
  &$extraStats: Array to save the new stats
    ( $extraStats['<name of statistic>'] => <value>; )
@@@ -2948,6 -2944,7 +2948,7 @@@ Special:Watchlist/edit
  $title: Title object
  $redirect: whether the page is a redirect
  $skin: Skin object
+ &$link: HTML link to title
  
  'WebRequestPathInfoRouter': While building the PathRouter to parse the
  REQUEST_URI.